# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=fbid
pkgver=16.1b35eb9
pkgrel=3
groups=('blackarch' 'blackarch-recon' 'blackarch-social')
pkgdesc='Show info about the author by facebook photo url.'
arch=('any')
url='https://github.com/guelfoweb/fbid'
license=('GPL3')
depends=('python2' 'python2-simplejson')
makedepends=('git')
source=("git+https://github.com/guelfoweb/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd $pkgname

  sed -i 's|/usr/bin/env python|/usr/bin/env python2|' "$pkgname.py"
}

package() {
  cd $pkgname

  install -Dm 755 "$pkgname.py" "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
}

